﻿
using System;
using System.Collections.ObjectModel;
using AdventureWorksLT.Web.Models;

namespace AdventureWorksLT.Views.Customers.DesignerData
{
    public class DesignTimeSalesOrderHeader : ObservableCollection<SalesOrderHeader>
    {
        
        public DesignTimeSalesOrderHeader()
        {
          for (int i = 0; i < 10; i++)
            {
                Add(CreateDesignSalesOrderHeaders(i));
            }
        }

        public SalesOrderHeader CreateDesignSalesOrderHeaders(int i)
        {
          var salesOrderHeaders = new SalesOrderHeader()
            {
            		SalesOrderID = 1+i, //Int32
		RevisionNumber = (byte)(2+i), //Byte
		OrderDate = Convert.ToDateTime("12/07/2010"), //DateTime
		DueDate = Convert.ToDateTime("12/07/2010"), //DateTime
		ShipDate = Convert.ToDateTime("12/07/2010"), //DateTime
		Status = (byte)(6+i), //Byte
		OnlineOrderFlag = true, //Boolean
		SalesOrderNumber = "Sales Order Number", //String
		PurchaseOrderNumber = "Purchase Order Number", //String
		AccountNumber = "Account Number", //String
		CustomerID = 11+i, //Int32   #Customer
		ShipToAddressID = 12+i, //Int32   #Address
		BillToAddressID = 13+i, //Int32   #Address
		ShipMethod = "Ship Method", //String
		CreditCardApprovalCode = "Credit Card Approval Code", //String
		SubTotal = 16+i, //Decimal
		TaxAmt = 17+i, //Decimal
		Freight = 18+i, //Decimal
		TotalDue = 19+i, //Decimal
		Comment = "Comment", //String
		rowguid = Guid.NewGuid(), //Guid
		ModifiedDate = Convert.ToDateTime("12/07/2010"), //DateTime
		};
		 return salesOrderHeaders;
        }
      }
}


